<%@ page pageEncoding="UTF-8"%>
<%
	String basePath=request.getContextPath();
%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="com.gdssoft.core.util.AppUtil"%>
<%@page import="com.gdssoft.framework.OffsupplyApplyDeptService"%>
<%@page import="com.gdssoft.framework.OffSupplyDeptSum"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="com.gdssoft.framework.MonitorParticipant"%>
<%@page import="com.gdssoft.framework.MonitorDealHistoryService"%>
<%@page import="java.util.Set"%>
<%@page import="java.util.List"%>
<%@page import="com.gdssoft.framework.MonitorDealHistory"%>
<%@page import="com.gdssoft.framework.FileAttach"%>
<%

	Long depId = new Long(request.getParameter("depId"));
	OffsupplyApplyDeptService offsupplyApplyDeptService = (OffsupplyApplyDeptService)AppUtil.getBean("offsupplyApplyDeptService");
	//out.print(offsupplyApplyDeptService);
	List<OffSupplyDeptSum> list = offsupplyApplyDeptService.offSupplySumByMonth(depId);
	request.setAttribute("list",list);
	double sum =0.0;
	for(OffSupplyDeptSum osds:list){
		sum+=new Double(osds.getPrice())*new Double(osds.getNumber());
	}
	request.setAttribute("sum",sum);
	//out.print(sum);
%>



<!--  <h1 align="center" title="事项来源">${arch.id}</h1> -->

<!-- <span style="float:right;padding-right:80%;">事项来源:${monitorApply.id}</span>-->

<center>部门办公用品统计表</center>
<div class="contentDiv">
<table class="table-info" cellpadding="0" cellspacing="1" width="98%" align="center">
 	<tr>
     		<td>名称</td>
     		<td>类型</td>
     		<td>单价</td>
     		<td>数量</td>
 	    </tr>
	<c:forEach var="depSum" items="${list}">
 	    <tr>
     		<td>${depSum.name}</td>
     		<td>${depSum.type}</td>
     		<td>${depSum.price}</td>
     		<td>${depSum.number}</td>
 	    </tr>
	</c:forEach>
</table>
<span style="float:left;padding-right:80%;">总金额:${sum}</span>
</div>
